Skip to content

Conversation

DaveRandom
Copy link
Contributor

Fix for bug #55700.

As this is a small feature with no BC implications, this patch targets 5.6.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property handlers need to be exported. The build fails because of undefined identifiers.

@DaveRandom DaveRandom force-pushed the feature/domxpath-registernodens-prop branch from ef097a1 to f62a89e Compare August 20, 2014 01:05
ext/dom/xpath.c Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this SEPARATE_ZVAL(&newval);? Not sure, but there must be an idiom for this :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SEPARATE_ZVAL would heap-allocate the copy, requiring it to be manually destroyed after the conversion. I'm not necessarily against this, but it does seem a little inefficient. I'm not aware of a macro that would gain us anything here, although I'm happy to be corrected.

Note also that this method is the same as the method used in other DOM property write handlers - do as the Romans do, and all that :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd trust the Romans too :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use zend_is_true instead. No copies required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good point. Will push updated patch later today.

@DaveRandom DaveRandom force-pushed the feature/domxpath-registernodens-prop branch from f62a89e to a13e68d Compare August 21, 2014 10:35
@DaveRandom DaveRandom force-pushed the feature/domxpath-registernodens-prop branch from a13e68d to 06028e4 Compare August 21, 2014 11:15
@DaveRandom
Copy link
Contributor Author

Patch is now updated according to comments.

@krakjoe
Copy link
Member

krakjoe commented Jan 4, 2017

I just realised this is extremely old, in light of that, and since this targets a security fix only branch, and since a patch against a supported branch would have to be different, I'm closing this PR.

Please take this action as encouragement to open a clean PR against a supported branch.

@krakjoe krakjoe closed this Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants